import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";

const getTitleApi = createApi({
  reducerPath: "getTitleApi", // reducerPath 建议使用更具描述性的名称
  baseQuery: fetchBaseQuery({
    baseUrl: "https://api.oioweb.cn/api/common/",
  }),
  endpoints: (builder) => ({
    getTitle: builder.query({
      query: () => "Get60sWorldInsight",
    }),
  }),
});

export const { useGetTitleQuery } = getTitleApi;
export default getTitleApi;
